import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import Layout from '../layout/index.vue'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/home',
    children: [{
      path: 'home',
      name: 'Home',
      component: () => import('../views/home/index.vue'),
      meta: { title: 'Dashboard', icon: 'dashboard' }
    },
    {
      path: 'aboutus',
      name: 'Aboutus',
      component: () => import('../views/aboutus/index.vue'),
      meta: { title: 'Dashboard', icon: 'dashboard' }
    },
  ],
  },
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
